Skip to content

Conversation

@serbrech
Copy link
Member

@serbrech serbrech commented Jul 24, 2025

fixes #8979


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

az fleet

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

Copilot AI review requested due to automatic review settings July 24, 2025 23:29
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Jul 24, 2025

⚠️Azure CLI Extensions Breaking Change Test
⚠️fleet
rule cmd_name rule_message suggest_message
⚠️ 1009 - ParaPropRemove fleet updaterun create cmd fleet updaterun create update parameter stages: removed property type=file_type
⚠️ 1009 - ParaPropRemove fleet updatestrategy create cmd fleet updatestrategy create update parameter stages: removed property type=file_type

@azure-client-tools-bot-prd
Copy link

Hi @serbrech,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

@github-actions
Copy link

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@yonzhan
Copy link
Collaborator

yonzhan commented Jul 24, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for inline JSON strings to the --stages argument in Azure fleet CLI commands, allowing users to provide stage configuration either as a file path or as inline JSON content.

Key Changes

  • Modified parameter handling to accept both file paths and inline JSON strings for the --stages argument
  • Updated the core parsing logic to detect whether input is a file path or JSON string
  • Added comprehensive test coverage for the new inline JSON functionality

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/fleet/azext_fleet/_params.py Updated parameter definitions to remove file type restrictions and clarify help text for inline JSON support
src/fleet/azext_fleet/custom.py Modified get_update_run_strategy function to handle both file paths and inline JSON strings
src/fleet/azext_fleet/tests/latest/test_stages_json.py Added comprehensive test suite covering file path, inline JSON, and error scenarios
Comments suppressed due to low confidence (1)

src/fleet/azext_fleet/tests/latest/test_stages_json.py:252

  • [nitpick] Consider adding test cases for other error scenarios such as missing required fields (e.g., missing 'stages' key, missing 'name' in stage/group) to ensure robust error handling.
        invalid_json = '{"stages": [{"name": "test", invalid_syntax}]}'

@github-actions
Copy link

github-actions bot commented Jul 24, 2025

Hi @serbrech

⚠️ Release Requirements

Module: fleet

  • ⚠️ Please update VERSION to be 1.7.0 in src/fleet/setup.py

Notes

@serbrech
Copy link
Member Author

@kairu-ms happy to merge this after your review

@serbrech
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 9000 in repo Azure/azure-cli-extensions

@kairu-ms
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

kairu-ms
kairu-ms previously approved these changes Jul 30, 2025
@serbrech
Copy link
Member Author

@copilot

  • Update VERSION to "1.6.1" in src/fleet/setup.py
  • log the update in src/fleet/HISTORY.rstas : "Modified parameter handling to accept both file paths and inline JSON strings for the --stages argument"

@github-actions github-actions bot added the release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually. label Jul 30, 2025
@kairu-ms
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@kairu-ms kairu-ms removed the release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually. label Jul 30, 2025
@github-actions github-actions bot added the release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually. label Jul 30, 2025
@kairu-ms
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@kairu-ms kairu-ms removed the release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually. label Jul 31, 2025
@github-actions github-actions bot added the release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually. label Jul 31, 2025
@kairu-ms
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@kairu-ms kairu-ms added skip-cal-version and removed release-version-block Updates do not qualify release version rules. NOTE: please do not edit it manually. labels Jul 31, 2025
@kairu-ms kairu-ms merged commit 1f0ed24 into Azure:main Jul 31, 2025
34 of 36 checks passed
@azclibot
Copy link
Collaborator

[Release] Update index.json for extension [ fleet-1.6.1 ] : https://dev.azure.com/msazure/One/_build/results?buildId=132232791&view=results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fleet] accept inline json for the --stages argument in commands updatestrategy and updaterun

4 participants